package com.jfunit.example.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.jfunit.java.annotation.Bean;
import com.jfunit.java.dao.FrameworkDAO;
import com.jfunit.example.entity.User;

@Bean
public class UserDao  extends FrameworkDAO{

    public List<User> getUserList() {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("username", "折56666655");
        //params.put("password", "58058caf285da777d5af7a5246964f18");
        //List<User> userList = this.getEntityListByLike(User.class,"username","折58网");
        //System.out.println(userList);
        /*User user = new User();
        user.setUsername("ffffff");*/
        /*String sql = "select * from user";
        List<Map<String, Object>> maps = this.executorQuery(sql,null);
        System.out.println(maps);*/
        try {
            //this.insertByObject(user);
            /*User user = new User();
            user.setId(3);
            user.setUsername("5555hhhhhjjj99999999");
            this.updateById(user, 3);*/
            //this.updateMapById(User.class, 2, params);
            /*String sql ="update user set username = 'vdsadfad' where id = ?";
            this.executeUpdate(sql,new Object[]{3});*/
            this.delete(User.class, 4);
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return null;
    }
}
